package graph_viewer.drawer;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Font;
import java.awt.FontMetrics;

import graph_viewer.structure.Node;
import graph_viewer.structure.Node_Position;
import graph_viewer.structure.Visual_Component;

import graph_viewer.util.Debug;

/**
	Define method to draw a node, the drawing is done by Node_Drawer_Handler in subclasses.
*/
public class Cluster_Drawer extends Basic_Node_Drawer{
	boolean has_label, has_DOI;

	public Cluster_Drawer(){
		set_has_DOI( false );
		set_has_label( false );
	}

	public Cluster_Drawer( boolean has_label, boolean has_DOI ){
		set_has_DOI( has_DOI );
		set_has_label( has_label );
	}
	
	public Cluster_Drawer( boolean has_label ){
		set_has_DOI( false );
		set_has_label( has_label );
	}

	public void set_has_DOI( boolean has ){
		has_DOI		= has;
	}

	public void set_has_label( boolean has ){
		has_label	= has;
	}
	
	public boolean get_has_DOI(  ){
		return has_DOI;
	}

	public boolean get_has_label(  ){
		return has_label;
	}

	//=================================================
	// hooker methods implementaion
	//=================================================
	protected void draw_node( Node node, Graphics2D g, int k ){		
		Node_Position	np = node.get_position();		
		int[] location 	= np.find_location();	
				
		g.setColor( NODE_BOXING_COLOR );
		g.drawRect( location[0], location[1], np.get_width(), np.get_height() );	
	}
	
}